package com.huike.web.controller.report;


import com.huike.clues.domain.vo.IndexStatisticsVo;
import com.huike.common.core.domain.AjaxResult;
import com.huike.business.domain.vo.BusinessChangeVo;
import com.huike.report.service.IReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/index")
public class IndexController {

    @Autowired
    private IReportService iReportService;

    @GetMapping("/businessChangeStatistics")
    public AjaxResult businessChangeStatistics(IndexStatisticsVo indexStatisticsVo){
        List<BusinessChangeVo> businessChangeStatisticsVo = iReportService.findBusinessChangeStatisticsVo(indexStatisticsVo.getBeginCreateTime(), indexStatisticsVo.getEndCreateTime());
        return AjaxResult.success(businessChangeStatisticsVo);
    }



    //线索转化龙虎榜接口
    @GetMapping("/salesStatistic")
    public AjaxResult salesStatistic(String beginCreateTime,String endCreateTime){
        List<BusinessChangeVo> businessChangeVos = iReportService.salesStatistic(beginCreateTime, endCreateTime);
        return AjaxResult.success(businessChangeVos);
    }



    //首页数据统计接口
}
